import { Body, Controller, Get, Param, Post, Query } from '@nestjs/common';
import { LargeModelService } from './large-model.service';
import { ApiOperation, ApiTags } from '@nestjs/swagger';
import { isNoAuth } from 'src/utils/decorator/jwt.decorator';
import { KsDto } from './dto/ks.dto';
import { DataBaseDto } from './dto/data-base.dto';
import { TaskDto } from './dto/task.dto';
import { ImportDataDto } from './dto/importData.dto';

@ApiTags('大模型')
@Controller('large-model')
@isNoAuth()
export class LargeModelController {
  constructor(private readonly largeModelService: LargeModelService) {}

  @ApiOperation({
    summary: '获取token',
  })
  @Get('login')
  async login(@Query() params: KsDto) {
    return await this.largeModelService.getToken(params);
  }

  @ApiOperation({
    summary: '主要用来测试',
  })
  @Post('test')
  async test() {
    return await this.largeModelService.testService();
  }

  @ApiOperation({
    summary: '创建数据集',
  })
  @Post('createDataBase')
  async createDataBase(@Query() params: DataBaseDto) {
    return await this.largeModelService.createDataBase(params);
  }
}
